package com.acoffee.maven.controller.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author acoffee
 * @create 2021-05-06 21:16
 */
@Controller
@RequestMapping(value="/hello")
public class HelloController {

    @RequestMapping("/hello")
    public ModelAndView hi(){
        ModelAndView modelAndView = new ModelAndView();
        System.out.println("========基于注解的springmvc中的hi方法========");
        modelAndView.setViewName("/welcome.jsp");
        return modelAndView;
    }

    @RequestMapping("/thanks")
    public ModelAndView thanks(){
        ModelAndView modelAndView = new ModelAndView();
        System.out.println("========基于注解的springmvc中的thank方法========");
        modelAndView.setViewName("/welcome.jsp");
        return modelAndView;
    }
}
